package com.guli.auth.feign;

import com.guli.auth.vo.SocialUser;
import com.guli.auth.vo.UserLoginVo;
import com.guli.auth.vo.UserRegisterVo;
import com.guli.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Repository
@FeignClient("member-service")
public interface MemberFeign {
    @PostMapping("member/member/regist")
    R regist(@RequestBody UserRegisterVo userRegisterVo);

    @PostMapping("member/member/login")
    R login(@RequestBody UserLoginVo userLoginVo);

    /**
     * 社交登录
     * @param socialUser
     * @return
     */
    @PostMapping("member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser);
}
